﻿using DocumentFormat.OpenXml.Lite.Xml;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Schema;
using System.Xml.Serialization;

namespace DocumentFormat.OpenXml.Lite.WordprocessingML.Word.RunProperties
{
    /// <summary>
    /// Referenced Character Style
    /// </summary>
    [XmlRoot("rStyle", Namespace = Constants.WordMain)]
    public class CharacterStyle : XmlSerializable, IRunPropElement
    {
        [XmlAttribute("val", Namespace = Constants.WordMain, Form = XmlSchemaForm.Qualified)]
        public string Value { get; set; }

        public CharacterStyle() { }

        public void Copy(object obj) 
        {
            if (obj is CharacterStyle)
            {
                this.Value = (obj as CharacterStyle).Value;
            }
        }
    }
}
